package com.lepu.app.usercenter.bean;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class BeanPwdQuestion {

	public String SQID;
	public String Question;
	
	public static ArrayList<BeanPwdQuestion> parseJsonData(String dataString)
	{
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONArray jsonArray = obj1.getJSONArray("ListInfo");
			
			result = jsonArray.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		Gson gson = new Gson();
		ArrayList<BeanPwdQuestion> testArraylist = gson.fromJson(result,
				new TypeToken<List<BeanPwdQuestion>>() {
				}.getType());
		return testArraylist;
	}
}
